<html>
	<head>
		<title></title>
		<link rel="stylesheet" type="text/css" href="./Pudlic/bt/css/bootstrap.min.css"/>
		<script src="./Pudlic/jquery-1.8.2.min.js"></script>
		<script type="text/javascript">
			$(function(){
				$('input[name=username]').blur(function(){
					var user = $(this).val();
					$.ajax({
						url : 'index.php?c=Memder&a=checkuser',
						type:'post',
						data:{u:user},
						success:function(phpdata){
							if(phpdata == 1){
								$('#user').html('<span style="color:red">用户名已注册</span>');
								$('#reg').attr('disabled',true);
							}else if(phpdata == 3){
								$('#user').html('<span style="color:red"></span>');
								$('#reg').attr('disabled',true);
							}else{
								$('#user').html('<span style="color:green">用户名可用</span>');
								$('#reg').attr('disabled',false);
							}
						}
					})
				})
			})
		</script>
	</head>
	<body>
		<div class="container">
		<form action="" method="post">
			用户名:<input type="text" name="username" value="" />
			<span id="user"></span>
			<br />
			密码:<input type="password" name="password" value="" />
			<br />
			<input type="submit" value="注册" id="reg"/>
		</form>
		</div>
	</body>
</html>